import os.path

from helper import get_work_dir, ini2dict
from log import get_logger

__all__ = ['cwd', 'config_obj', 'logger']

plugin_prefix = 'check_'
cwd = get_work_dir()
config_obj = ini2dict(os.path.join(cwd, 'config.ini'))
logger = get_logger(config_obj['logger']['name'],
                    config_obj['logger']['logfile'],
                    config_obj['logger']['level'])
logger.debug(config_obj)

